A More Complex Recurrence Relation And Counting Inversions